package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import com.atguigu.eduservice.client.impl.SmsClientImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "service-sms", fallback = SmsClientImpl.class)
@Component
public interface SmsClient {

    @ApiOperation("/发送注册验证码")
    @PostMapping("/msmService/msm/code/register/{phone}")
     R sendRegisterCode(@PathVariable("phone") String phone);

    @ApiOperation("/发送登录验证")
    @PostMapping("/msmService/msm/code/login/{phone}")
     R sendLoginCode(@PathVariable("phone") String phone);
}
